package org.game;

import org.game.config.GameConfig;
import org.utils.ExceptionEx;
import com.sojoys.artifact.core.IServer;
import com.xiaoleilu.hutool.log.Log;
import com.xiaoleilu.hutool.log.LogFactory;

public class Bootstrap {
    private final static Log log = LogFactory.get(Bootstrap.class);

    public static void main(String[] args) {
        try {
            // shutdownHook();
            IServer.setIConfig(new GameConfig());
            IServer.start();
        } catch (Exception e) {
            log.error(ExceptionEx.e2s(e));
            System.exit(1);
        }
    }

    // private static void shutdownHook(){
    // Runtime.getRuntime().addShutdownHook(new Thread(()->{
    // try {
    // DbSave.saveAll();
    // } catch (Exception e) {
    // e.printStackTrace();
    // }
    // }));
    // }
}
